1. Field of the Invention
The present invention relates to an image processing apparatus and method, an image processing program and an imaging apparatus, which correct an image whose image quality, including contrast and colors, is impaired by the haze, fog, or the like.
2. Description of the Related Art
The image quality of an image, including contrast and colors, may be impaired by the haze or fog generated in the atmosphere. For example, a landscape photograph of a distant mountain may be taken outdoors. If the distant mountain is in mist, the photographed image is degraded by the mist, and the distant mountain may not be clearly recognized in the photograph.
Jpn. Pat. Appln. KOKAI Publication No. 2012-054659 and Jpn. Pat. Appln. KOKAI Publication No. 2010-152536 (Japanese Patent No. 4982475) propose technology for solving the problem. Jpn. Pat. Appln. KOKAI Publication No. 2012-054659 calculates a maximal brightness value and a minimal brightness value from the image, and contrast correction is made to increase the difference between the calculated maximal and minimal brightness values, thereby improving the visibility of the image. If the landscape of the photograph is entirely in mist, the technique disclosed in Jpn. Pat. Appln. KOKAI Publication No. 2012-054659 can be fully effective.
Jpn. Pat. Appln. KOKAI Publication No. 2010-152536 calculates a maximal brightness value and a minimal brightness value for each of local regions of an image, and adaptive contrast correction is made to increase each of the differences between the calculated maximal values and minimal brightness values. Jpn. Pat. Appln. KOKAI Publication No. 2010-152536 enables sufficient contrast correction even if the image includes both a mist region and a non-mist region.